<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.14/vue.min.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
</head>

<body>
  <div id="app">
    {{msg}}
    {{users}}
    <button @click="loadData">查询</button>
  </div>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        msg: 'hello world',
        users: []
      },
      methods: {
        loadData() {
          const url = 'http://localhost:3000/user/findAll'
          axios.get(url).then(res => {
            this.users = res.data.data
          })
        }
      }
    })
  </script>
</body>

</html>